Digital data processors execute instructions that are represented by respective operation codes, also referred to herein as “opcodes.” Selection of an instruction set and assignment of opcodes to the respective instructions of that set are important issues in the design of a given processor. By way of example, a 32-bit processor that utilizes 16 bits for the opcode can support up to 216=64K instructions. Typically, the processor will not need to support that many instructions, and thus a designer has an ability to select which of the available opcodes will be assigned to the respective instructions.
In conventional practice, a single opcode is generally assigned to each instruction. An example of this approach is described in U.S. Patent Application Publication No. 2006/0101297, entitled “Reducing Power Consumption of a Microprocessor.” This approach determines the probability of occurrence of each instruction in an instruction set, and assigns an opcode to each instruction based on the probability of occurrence of that instruction in programs likely to be executed by the processor. The instructions having the highest probability of occurrence are assigned operation codes that require fewer signal transitions, such that the power consumption of the processor is reduced.
A problem with this conventional approach is that it is unduly rigid in its application, and accordingly does not achieve sufficient reduction of power consumption, particularly for processors that operate with a variety of different types of programs. More particularly, once the assignment of operation codes to respective instructions is determined, and the corresponding processor is designed and manufactured, there is insufficient opportunity to modify the initial assignment if the programs to be executed by the processor should happen to change.
Accordingly, a need exists for an improved approach to operation code assignment which provides enhanced flexibility and thereby additional opportunities for substantial reductions in processor power consumption.